# Maintainer: Andrzej Giniewicz <gginiu@gmail.com>
# Contributor: Kaizhao Zhang <zhangkaizhao@gmail.com>

pkgname=python-googleapis-common-protos
pkgver=1.61.0
pkgrel=1
pkgdesc="Python classes generated from the common protos in the googleapis repository"
arch=('any')
url="https://github.com/googleapis/googleapis"
license=('Apache')
depends=('python-protobuf')
optdepends=('python-grpcio: for grpc support')
makedepends=('python-build' 'python-installer' 'python-setuptools' 'python-wheel')
source=("https://files.pythonhosted.org/packages/source/g/googleapis-common-protos/googleapis-common-protos-${pkgver}.tar.gz")
sha256sums=('8a64866a97f6304a7179873a465d6eee97b7a24ec6cfd78e0f575e96b821240b')

build() {
  cd googleapis-common-protos-$pkgver
  python -m build --wheel --no-isolation
}

package() {
  cd googleapis-common-protos-$pkgver
  python -m installer --destdir="$pkgdir" dist/*.whl

  chmod -R +r "$pkgdir"
}
